import store from '@/store'

export default {
  methods: {
    checkPermission (key) {
      const { userInfo } = store.state.user
      const points = userInfo.roles.points
      if (points && points.length) {
        return points.some(item => item === key)
      }
      return false
    }
  }
}
